//
//  CollectionCellFive.m
//  
//
//  Created by dllo on 16/1/27.
//
//

#import "CollectionCellFive.h"
#import "TableCellOneForCollectionFive.h"




@interface CollectionCellFive ()<UITableViewDataSource,UITableViewDelegate>



@end

@implementation CollectionCellFive

- (instancetype)initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    if (self) {
        
//        if (self.arrForCollectionViewFive) {
          [self createSubViews];
//        }else {
//            UIImageView *backGround = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"wuwang"]];
//            backGround.frame = self.bounds;
//            [self addSubview:backGround];
//            [backGround release];
//        }
        
    }
    return self;
}
#pragma mark createTableView

- (void)createSubViews {

    self.tableView = [[UITableView alloc]initWithFrame:self.bounds style:UITableViewStylePlain];
    [self.contentView addSubview:self.tableView];
    
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    
    [self.tableView registerClass:[TableCellOneForCollectionFive class] forCellReuseIdentifier:@"TableViewCellOneForCollectionViewCellFive"];
    [self.tableView release];
}

#pragma mark tableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return self.arrForCollectionViewFive.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ModelForCollectionViewFive *model = [self.arrForCollectionViewFive objectAtIndex:indexPath.row];
    TableCellOneForCollectionFive *cell = [tableView dequeueReusableCellWithIdentifier:@"TableViewCellOneForCollectionViewCellFive"];
    [cell passModelForCell:model];
    return cell;
}

#pragma mark tableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    return 250;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {





}


@end
